/*
 * FileFS.h
 *
 * Zdroj adresara: Filesystem
 *
 *  Created on: 1.4.2011
 *      Author: Tomas Srna
 */

#ifndef __FILEFS_H_
#define __FILEFS_H_

#include <cstdio>
#include <cerrno>
#include <string>
#include "IFile.h"
#include <dirent.h>

class FileFS : public IFile
{
private:
	std::string source;
	FILE * fd;
public:
	FileFS(std::string source);
	void open(const char * filename, const char * mode);
	int read(void * buf, int len);
	int write(const void * buf, int len);
	bool eof();
	void close();
	std::string type() const;
	virtual ~FileFS();
};

#endif /* __FILEFS_H_ */
